<form id="pagerForm" method="post" action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/showlist/')}">
	<input type="hidden" name="pageNum" value="{$currentPage|default='1'}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="_order" value="{$_REQUEST._order}"/>
	<input type="hidden" name="_sort" value="{$_REQUEST._sort}"/>
	<input type="hidden" name="search_where[account_id][eq]" value="{$_REQUEST.search_where.account_id.eq}"/>
	<input type="hidden" name="search_where[account_sequence][eq]" value="{$_REQUEST.search_where.account_sequence.eq}"/>
	<input type="hidden" name="search_where[supplier_id][eq]" value="{$_REQUEST.search_where.supplier_id.eq}"/>
	<input type="hidden" name="search_where[depot_id][eq]" value="{$_REQUEST.search_where.depot_id.eq}"/>
	<input type="hidden" name="search_where[goods_id][eq]" value="{$_REQUEST.search_where.goods_id.eq}"/>
	<input type="hidden" name="search_where[goods_name][eq]" value="{$_REQUEST.search_where.goods_name.eq}"/>
</form>
<div class="page">
	<div class="pageHeader">
		<form onsubmit="return navTabSearch(this);" action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/showlist/')}" method="post">
			<table class="searchContent" width="100%" style="align:left;">
				<tr>
					<td width="6%" align="right">帐套名称：</td>
		        	<td width="10%" align="left">
			        	<input id="account.id" name="search_where[account_id][eq]" value="{$search_where.account_id.eq}" type="hidden"/>
			        	<input type="text" id="account.sequence" name="search_where[account_sequence][eq]" lookupGroup="account" value="{$search_where.account_sequence.eq}" size="20" readonly="readonly" />
			        </td>
			        <td width="3%">
			        	<a class="btnLook" lookupGroup="account" href="{:U(MODULE_NAME.'/Account/lookup')}" ></a>
		    		</td>
		        	<td width="6%" align="right">物料名称：</td>
		        	<td width="17%" align="left">
			        	<input id="goods.id" name="search_where[goods_id][eq]" value="{$search_where.goods_id.eq}" type="hidden"/>
			        	<input type="text" id="goods.name" name="search_where[goods_name][eq]" lookupGroup="goods" value="{$search_where.goods_name.eq}" size="33" readonly="readonly" />
			        </td>
			        <td width="3%">
			        	<a class="btnLook" lookupGroup="goods" href="{:U(MODULE_NAME.'/Goods/lookup')}" ></a>
		    		</td>
		    		<td width="6%" align="right">物料编码：</td>
		    		<td width="10%" align="left">
						<input type="text" name="search_where[code][like]" size="20" minlength="4" maxlength="20" value="{$search_where.code.like}"/>
 					</td>
 					<td width="6%" align="right">供应商：</td>
 					<td width="10%" align="left">
						<select class="combox" name="search_where[supplier_id][eq]">
							<option value="">请选择</option>
							<foreach name='supplier' item='v'>
								<option value="{$v['id']}" <eq name="_REQUEST.search_where.supplier_id.eq" value="$v['id']">selected=selected</eq>>{$v['name']}</option>
							</foreach>
						</select>
					</td>	
					<td width="6%" align="right">库房：</td>
					<td width="10%" align="right">
	 					<select class="combox" name="search_where[depot_id][eq]">
							<option value="">请选择</option>
							<foreach name='depot' item='v'>
								<option value="{$v['id']}" <eq name="_REQUEST.search_where.depot_id.eq" value="$v['id']">selected=selected</eq>>{$v['name']}</option>
							</foreach>
						</select>		
					</td>
					<td align="right" width="6%">
						<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
					</td>
		    	</tr>
			</table>
		</form>
	</div>
	<div class="pageContent">
		<!--<div class="panelBar">
			<ul class="toolBar">
				<li><a class="add" href="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/add')}" target="navTab" rel="storageAdd" title="物料入库"><span>添加</span></a></li>
				<li class="line">line</li>
			</ul>
		</div>
		<div id="w_list_print">-->
		<table class="list" width="100%" layoutH="62">
			<thead align="center">
				<tr>
					<th rowspan="2">序号</th>
					<th colspan="2">库房信息</th>
					<th colspan="6">物料信息</th>
					<th colspan="2">期初</th>
					<th colspan="2">收入</th>
					<th colspan="2">支出</th>
					<th colspan="2">调入</th>
					<th colspan="2">调出</th>
					<th colspan="2">退货</th>
					<th colspan="2">损溢</th>
					<th colspan="2">期末</th>
					<th rowspan="2">其他</th>
				</tr>
				<tr>
					
					<th orderField="supplier_name" <if condition="$Think.REQUEST._order eq 'supplier_name'">class="{$Think.REQUEST._sort}"</if>>供应商</th>
					<th orderField="depot_name" <if condition="$Think.REQUEST._order eq 'depot_name'">class="{$Think.REQUEST._sort}"</if>>库房</th>
					<th orderField="code" <if condition="$Think.REQUEST._order eq 'code'">class="{$Think.REQUEST._sort}"</if>>编码</th>
					<th orderField="goods_name" <if condition="$Think.REQUEST._order eq 'goods_name'">class="{$Think.REQUEST._sort}"</if>>名称</th>
					<th>型号</th>
					<th>规格</th>
					<th>单位</th>
					<th>单价</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>
					<th>数量</th>
					<th>金额</th>					
				</tr>
			</thead>
			<tbody align="center">
				<foreach name='list' item='v' key='k'>					

					<tr target="sid_goods" rel="">
					<td>{$k+1}</td>
					<td>{$v['supplier_name']}</td>
					<td>{$v['depot_name']}</td>
					<td>{$v['code']}</td>
					<td>{$v['goods_name']}</td>
					<td>{$v['xinghao']}</td>
					<td>{$v['guige']}</td>
					<td>{$v['unit']}</td>
					<td>{$v['price']}</td>
					<td>{$v['begin']}</td>
					<td>{$v['begin']*$v['price']}</td>
					<td>{$v['income']}</td>
					<td>{$v['income']*$v['price']}</td>
					<td>{$v['pay']}</td>
					<td>{$v['pay']*$v['price']}</td>
					<td>{$v['movein']}</td>
					<td>{$v['movein']*$v['price']}</td>
					<td>{$v['moveout']}</td>
					<td>{$v['moveout']*$v['price']}</td>
					<td>{$v['refund']}</td>
					<td>{$v['refund']*$v['price']}</td>
					<td>{$v['loss']}</td>
					<td>{$v['loss']*$v['price']}</td>
					<td>{$v['final']}</td>
					<td>{$v['final']*$v['price']}</td>
					<td>

					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select class="combox" name="numPerPage" onchange="navTabPageBreak({$Think.config.TMPL_L_DELIM}numPerPage:this.value{$Think.config.TMPL_R_DELIM})">
					<option value="10" <if condition="$numPerPage eq 10">selected</if>>10</option>
					<option value="20" <if condition="$numPerPage eq 20">selected</if>>20</option>
					<option value="50" <if condition="$numPerPage eq 50">selected</if>>50</option>
					<option value="100" <if condition="$numPerPage eq 100">selected</if>>100</option>
				</select>
				<span>条，共{$totalCount}条</span>
			</div>
			<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="{$pageNumShown}" currentPage="{$currentPage}">
			</div>
		</div>
	</div>
</div>